//////////////////////////////////////////////////////////////////////////
//
// GAM203
// Skybox cube class
// SkyboxCube.h
// 
// Scott Taylor
// Qantm College
//
//////////////////////////////////////////////////////////////////////////

#ifndef SKYBOXCUBE_H
#define SKYBOXCUBE_H

#include "Drawable.h"

#include <d3d9.h>
#include <d3d9types.h>

class SkyboxCube : public Drawable
{
public:
	// Vertex format we will use to describe our vertices (must match FVF format below)
	struct VertexData
	{
		D3DVECTOR pos;  // XYZ position
		D3DCOLOR col;
		float u,v;  // Texture coordinates (UVs)
	};

	// DirectX's way of identifying what's in our vertex structure (we bitwise OR these values)
	static const DWORD VERTEX_FORMAT_FVF = D3DFVF_XYZ | D3DFVF_DIFFUSE | D3DFVF_TEX1;

public:
	SkyboxCube();
	virtual ~SkyboxCube();

	virtual bool CreateObject(IDirect3DDevice9* a_pDevice, char* a_pTexFileName);
	virtual void Render(float a_dt, IDirect3DDevice9* a_pDevice, const RenderParams& a_renderParams);

protected:
	static const int TEX_FILENAME_LEN = 256;
	char m_texFilename[TEX_FILENAME_LEN];

	IDirect3DTexture9* m_pTex;

	D3DMATERIAL9 m_mtl;
};

#endif  // SKYBOXCUBE_H
